home *** CD-ROM | disk | FTP | other *** search
- 10 REM SPLTSCRN.BAS-Splits the screen at horizontal dividing line location of your choice and scrolls each window up or down a
- 20 REM This program is set up as a demo, but by changing the appropriate vari ables, you can change the size & location of the windows
- 30 REM TULR%=top window,upper left row:LLLC%=lower window,lower left column etc Length must be < height of window.Length%=number of lines to ju
- 40 REM Submitted by Emile Alline 834-6444...also available on disk...enjoy!!
- 50 :
- 60 REM Poke a 64 byte machine lang routine at 32,768...relocate if desired
- 70 DEF SEG:SCROLLR=&H8000
- 80 FOR ADDRESS=SCROLLR TO SCROLLR+&H40:READ CODE:POKE ADDRESS,CODE:NEXT ADDRESS
- 90 DATA &H55
- 100 DATA &H8B,&HEC
- 110 DATA &H50
- 120 DATA &H53
- 130 DATA &H51
- 140 DATA &H52
- 150 DATA &H56
- 160 DATA &H8B,&HB6,&H10,&H00
- 170 DATA &H8A,&H2C
- 180 DATA &H8B,&HB6,&H0E,&H00
- 190 DATA &H8A,&H0C
- 200 DATA &H8B,&HB6,&H0C,&H00
- 210 DATA &H8A,&H34
- 220 DATA &H8B,&HB6,&H0A,&H00
- 230 DATA &H8A,&H14
- 240 DATA &H8B,&HB6,&H08,&H00
- 250 DATA &H8A,&H3C
- 260 DATA &H8B,&HB6,&H06,&H00
- 270 DATA &H8A,&H04
- 280 DATA &HFE,&HCD
- 290 DATA &HFE,&HC9
- 300 DATA &Hfe,&Hce
- 310 DATA &HFE,&HCA
- 320 DATA &HB4,&H06 :REM 06 =scroll up, 07 =scroll down
- 330 DATA &HCD,&H10
- 340 DATA &H5E
- 350 DATA &H5A
- 360 DATA &H59
- 370 DATA &H5B
- 380 DATA &H58
- 390 DATA &H5D
- 400 DATA &HCA,&H0C,&H00
- 410 REM Set up location of dividing line,disregard illegal entries
- 420 CLS:INPUT"Enter line number between 3 and 22 to set screen split";X:IF X<3 OR X>22 THEN 420 ELSE SPLIT=X
- 430 REM Set up the dividing line between upper & lower windows
- 440 CLS:KEY ON:LOCATE SPLIT,1:PRINT "********************* THIS IS WHERE THE SCREEN SPLITS **************************"
- 450 REM Define upper window
- 460 UULR%=1:UULC%=1:ULRR%=SPLIT-1:ULRC%=80:UATTR%=53:ULENGTH%=1
- 470 REM Define lower window
- 480 LULR%=SPLIT+1:LULC%=1:LLRR%=24:LLRC%=80:LATTR%=53:LLENGTH%=1
- 490 REM Set initial cursor positions
- 500 UCR=1:UCC=1:LCR=SPLIT+1:LCC=1
- 510 REM Set initial values for displayed char
- 520 U=100:L=100
- 530 REM Position cursor to print first char on upper screen
- 540 LOCATE UCR,UCC
- 550 REM Print it without carrige return
- 560 PRINT U;
- 570 REM Save this cursor pos for next char on upper scrn
- 580 UCR=CSRLIN:UCC=POS(0)
- 590 REM If next pos is on lower boundry then scroll text up to make room
- 600 IF UCR>SPLIT-1 THEN CALL SCROLLR (UULR%,UULC%,ULRR%,ULRC%,UATTR%,ULENGTH%):UCR=SPLIT-1:U=U+1
- 610 REM Then move cursor up one line into newly vacated line
- 620 REM Same as above but for lower window
- 630 LOCATE LCR,LCC:PRINT L;:LCR=CSRLIN:LCC=POS(0):IF LCR>23 THEN CALL SCROLLR (LULR%,LULC%,LLRR%,LLRC%,LATTR%,LLENGTH%):LCR=23:L=L+1
- 640 REM Run until any key hit then list to play around again!
- 650 X$=INKEY$:IF X$="" THEN 540 ELSE LIST
- :LCR=23:L=L+1